aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/sujet/[slug].tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-09 18:26:23 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commit15522ec9146f6f1956620355c44dea2a6a75b67c (patch)
tree7be0c4ca96cb3e59d2ee989785a6b6a286e6169d /src/pages/sujet/[slug].tsx
parent891441a76173c708c6604fa203b175aefa222333 (diff)
refactor(components): replace ResponsiveImage with Figure component
The styles applied to ResponsiveImage are related to the figure and figcaption elements. Those elements could be use with other contents than images. So I extracted them in a Figure component. The ResponsiveImage component is no longer useful: the consumer should use the Image component from `next` and wrap it in a link if needed.
Diffstat (limited to 'src/pages/sujet/[slug].tsx')
-rw-r--r--src/pages/sujet/[slug].tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pages/sujet/[slug].tsx b/src/pages/sujet/[slug].tsx
index 8e3100f..899f9e1 100644
--- a/src/pages/sujet/[slug].tsx
+++ b/src/pages/sujet/[slug].tsx
@@ -2,6 +2,7 @@
import type { ParsedUrlQuery } from 'querystring';
import type { GetStaticPaths, GetStaticProps } from 'next';
import Head from 'next/head';
+import NextImage from 'next/image';
import { useRouter } from 'next/router';
import Script from 'next/script';
import { useIntl } from 'react-intl';
@@ -11,7 +12,6 @@ import {
LinksListWidget,
PageLayout,
PostsList,
- ResponsiveImage,
type MetaData,
} from '../../components';
import {
@@ -101,7 +101,7 @@ const TopicPage: NextPageWithLayout<TopicPageProps> = ({
const getPageHeading = () => (
<>
- {cover ? <ResponsiveImage className={styles.logo} {...cover} /> : null}
+ {cover ? <NextImage {...cover} className={styles.logo} /> : null}
{title}
</>
);